Computer data storage devices, such as disk drives and Redundant Array of Independent Disks (RAID), typically use a cache memory in combination with mass storage media (e.g., magnetic tape or disk) to save and retrieve data in response to requests from a host device. Cache memory, often referred to simply as “cache”, offers improved performance over implementations without cache. Cache typically includes one or more integrated circuit memory device(s), which provide a very high data rate in comparison to the data rate of non-cache mass storage medium. Due to unit cost and space considerations, cache memory is usually limited to a relatively small fraction of (e.g., 256 kilobytes in a single disk drive) mass storage medium capacity (e.g., 256 Gigabytes). As a result, the limited cache memory should be used as efficiently and effectively as possible.
Cache is typically used to temporarily store data prior to transferring the data to an ultimate destination. For example, a read cache is often used to temporarily store data that is destined for the host device. In addition, a write cache is typically used to temporarily store data from the host device that is destined for the mass storage medium. Thus, cache is typically divided into a read cache portion and a write cache portion. Data in cache is typically processed on a page basis. The size of a page is generally fixed in a particular implementation; a typical page size is 64 kilobytes.
Because the cache is limited in size, the read cache and write cache are typically limited to predetermined, fixed sizes. Typically, the fixed sizes of the read cache and the write cache are selected at storage device manufacture time or initialization time. The sizes of the read and write cache are generally chosen based on what the manufacturer or seller believe will be a typical host workload. For example, if the manufacturer thinks that the typical or most commonly encountered workload will be host read workloads, the manufacturer may allocate more of the limited cache to the read cache. Of course, during operation, the actual host workload may not be the workload type for which the cache was allocated. Thus, in a typical storage device, the apportionment of cache between read cache and write cache is fixed during operation, regardless of what the actual host workload encountered.